package com.itheima.lambdaTest111;

public class LambdaTestParam {
    public static void main(String[] args) {


        /*int number = getNumber(new Inter() {
            @Override
            public int show(int a, int b) {
                return a + b;
            }
        }, 44, 11);
        System.out.println(number);



        //lambda:
        int number1 = getNumber((int a, int b) -> {
            return a + b;
        }, 88, 55);
        System.out.println(number1);


        getNumber1(new Inter() {
            @Override
            public int show(int a, int b) {
                return a+b;
            }
        });*/

        int number1 = getNumber1((a, f) -> {
            return a + f;
        });
        System.out.println(number1);
    }

    public static int getNumber(Inter inter, int s1, int s2) {
        int number = inter.show(s1, s2);
        return number;
    }

    public static int getNumber1(Inter inter){
        int show = inter.show(22, 55);
        return show;

    }
}

interface Inter {
    int show(int a, int b);
}
